var app = getApp(), animationShowHeight = 300;

Page({
    data: {
        animationData: "",
        showModalStatus: !1,
        imageHeight: 0,
        imageWidth: 0
    },
    imageLoad: function(t) {
        this.setData({
            imageHeight: t.detail.height,
            imageWidth: t.detail.width
        });
    },
    showModal: function() {
        var t = wx.createAnimation({
            duration: 200,
            timingFunction: "linear",
            delay: 0
        });
        (this.animation = t).translateX(-animationShowHeight).step(), this.setData({
            animationData: t.export(),
            showModalStatus: !0
        }), setTimeout(function() {
            t.translateX(0).step(), this.setData({
                animationData: t.export()
            });
        }.bind(this), 200);
    },
    hideModal: function() {
        var t = wx.createAnimation({
            duration: 200,
            timingFunction: "linear",
            delay: 0
        });
        (this.animation = t).translateX(animationShowHeight).step(), this.setData({
            animationData: t.export()
        }), setTimeout(function() {
            t.translateX(0).step(), this.setData({
                animationData: t.export(),
                showModalStatus: !1
            });
        }.bind(this), 200);
    },
    onShow: function() {
        wx.getSystemInfo({
            success: function(t) {
                animationShowHeight = t.windowHeight;
            }
        });
    },
    onLoad: function() {
        wx.onSocketClose(callback);
    }
});